-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #11434 - resolve differences in AliasCheckerSymlinkTests #12208
Issue #11434 - resolve differences in AliasCheckerSymlinkTests #12208
Conversation
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
@@ -0,0 +1 @@ | |||
This is in the second WEB-INF dir. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOLN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional so we don't have to check for newline in the response for the test.
@@ -0,0 +1 @@ | |||
This is a file in the combined resource dir. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOLN
@@ -0,0 +1 @@ | |||
file1 from combined dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOLN
@@ -0,0 +1 @@ | |||
file1 from webroot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOLN
@@ -1197,7 +1197,7 @@ protected boolean handleByContextHandler(String pathInContext, ContextRequest re | |||
return true; | |||
} | |||
|
|||
return super.handleByContextHandler(pathInContext, request, response, callback); | |||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this always false return.
I think this method would be better written like:
protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
if (!request.instanceof ServletContextRequest && isProtectedTarget(pathInContext))
return false;
return super.handleByContextHandler(pathInContext, request, response, callback);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, but this code is incorrect with isProtectedTarget(pathInContext)
here.
I think this is correct:
boolean initialDispatch = request instanceof ServletContextRequest;
if (!initialDispatch)
return false;
return super.handleByContextHandler(pathInContext, request, response, callback);
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
closes #11434